package com.vencent.spring.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import com.vencent.spring.bean.Person;

/**
 * 注解PropertySource必须配合@Configuration来使用。
 * @author 1d
 *
 */
@Configuration
@PropertySource("classpath:app.properties")
public class PersonConfig {
	
	@Bean
	@CustomeProfile("dev")
	public Person person1(){
		return new Person("a");
	}
	
	@Bean
	@CustomeProfile("test")
	public Person person2(){
		return new Person("b");
	}
}
